From 5b0a5b8713be15939986632230ecf3308cbeedc8 Mon Sep 17 00:00:00 2001 From: "kaf24@scramble.cl.cam.ac.uk" Date: Sun, 23 Mar 2003 15:51:53 +0000 Subject: [PATCH] bitkeeper revision 1.156 (3e7dd819fSxxToqPHGYcqfQraKgswQ) dom0_ops.c: Fix domain creation for >= 32 domains. --- xen/common/dom0_ops.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xen/common/dom0_ops.c b/xen/common/dom0_ops.c index e6d54e9695..2c3f5266ce 100644 --- a/xen/common/dom0_ops.c +++ b/xen/common/dom0_ops.c @@ -18,6 +18,10 @@ extern unsigned int alloc_new_dom_mem(struct task_struct *, unsigned int); static unsigned int get_domnr(void) { +#if 1 + static unsigned int domnr = 0; + return ++domnr; +#else struct task_struct *p = &idle0_task; unsigned long dom_mask = 0; read_lock_irq(&tasklist_lock); @@ -28,6 +32,7 @@ static unsigned int get_domnr(void) while ( (p = p->next_task) != &idle0_task ); read_unlock_irq(&tasklist_lock); return (dom_mask == ~0UL) ? 0 : ffz(dom_mask); +#endif } static void build_page_list(struct task_struct *p) -- 2.30.2